import React, { PureComponent } from 'react';
import { NavBar} from 'antd-mobile';
import Address from './Address';
class Address_edit extends PureComponent<any,any> {
    back() {
        if(this.props.location.state){
            this.props.history.push({pathname:'/addresslist',state:{time:this.props.location.state.time}})
        }
        else{
            this.props.history.push('/addresslist')
        }
    }
    render() {
        return (
            <div className='addressadd'>
                <header>
                    <NavBar onBack={() => { this.back() }}>编辑地址</NavBar>
                </header>
                <main>
                <Address/>
                </main>
            </div>
        );
    }
}

export default Address_edit;